Skip to content

[RHDHBUGS-3010]: Fix GitHub publication workflow (release-1.9)#2101

Merged
themr0c merged 10 commits into
redhat-developer:release-1.9from
themr0c:fix/gh-pages-workflow-1.9
Apr 27, 2026
Merged

[RHDHBUGS-3010]: Fix GitHub publication workflow (release-1.9)#2101
themr0c merged 10 commits into
redhat-developer:release-1.9from
themr0c:fix/gh-pages-workflow-1.9

Conversation

@themr0c

@themr0c themr0c commented Apr 24, 2026

Copy link
Copy Markdown
Member

IMPORTANT: Do Not Merge - To be merged by Docs Team Only

Version(s): 1.9
Issue: https://redhat.atlassian.net/browse/RHDHBUGS-3010
Preview: N/A (workflow and build script changes)

Summary

Cherry-pick of scripts + workflow changes from the main PR (/pull/2100). Merge this first.

  • Fix CQA-14 recursion that destroys PR builds by overwriting main/ on gh-pages (preliminary report + CQA_RUNNING guard)
  • Rewrite deploy-gh-pages.sh as Node.js (deploy-gh-pages.js) with integrated cleanup, index regeneration, and rebase retry
  • Remove redundant CQA directory copy in pr.yml
  • Remove unused scripts: build.sh, build-cqa.sh, lint-scripts.sh

Test plan

  • Verify PR build deploys to pr-N/ (not main/) on gh-pages
  • Verify release-1.9 branch build deploys correctly
  • Verify CQA-14 standalone run does not destroy PR builds

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

themr0c and others added 4 commits April 24, 2026 15:46
…ode.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The rsync on line 148 already copies the entire build/scripts directory
including cqa/. The subsequent rm + cp of the same cqa/ directory was
a leftover from before rsync was used.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Legacy utility script with no references from any workflow, script,
or documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
build-cqa.sh: thin wrapper for node cqa/index.js --all, never
referenced by any workflow or script.

lint-scripts.sh: local shellcheck runner superseded by the
shellcheck.yml workflow using reviewdog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhdh-bot

rhdh-bot commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Shellcheck Analysis Results

No shell scripts were changed in this PR.


Automated shellcheck analysis • See shellcheck.net for details

@rhdh-bot

rhdh-bot commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

PR Build Results

Build failed -- 34/34 titles | 129s
Preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-2101/

View full logs


Content Quality Assessment

CQA Report

  • CQA-00a: Orphaned modules
  • CQA-00b: Directory structure
  • CQA-01: Vale AsciiDoc DITA compliance
  • CQA-02: Verify assembly structure
  • CQA-03: Verify content type metadata
  • CQA-04: Verify module templates
  • CQA-05: Verify required modular elements
  • CQA-06: Verify assemblies follow official template (one user story)
  • CQA-07: Verify TOC depth (max 3 levels)
  • CQA-08: Verify short description content quality
  • CQA-09: Verify short description format
  • CQA-10: Verify titles are brief, complete, and descriptive
  • CQA-11: Verify procedure prerequisites
  • CQA-12: Verify grammar and style (Vale)
  • CQA-13: Verify content matches declared type
  • CQA-14: Verify no broken links
  • CQA-15: Check redirects
  • CQA-16: Verify official product names
  • CQA-17: Verify legal disclaimers for preview features

Summary

Checks: 19 total, 19 pass, 0 fail

19 checks: 19 pass, 0 fail

Run node build/scripts/cqa/index.js --all --fix locally to review and auto-fix issues.


Updated 2026-04-24 15:22:42 UTC

Shellcheck: filter out deleted .sh files before running shellcheck,
preventing reviewdog parse error on empty input.

SonarCloud: use http.extraHeader for git auth instead of embedding
token in remote URL, avoiding security hotspot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add --no-cqa and --no-lychee flags to build-orchestrator.js
- Use --no-cqa in build-asciidoc.yml (CQA results not surfaced in branch builds)
- Fix CQA-14 hardcoded '-b main': detect current branch from git
- CQA-14 standalone now passes --no-cqa to avoid redundant CQA run

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace node:https callback API with fetch() (Node 18+)
- Remove unused branchDir parameter from applyContent()
- Extract cleanup from stageAndCommit into pushWithRetry (runs once, not per retry)
- Deduplicate readdirSync call for diagnostics
- Add flow overview and inline comments for non-obvious decisions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Node.js rewrite was 325 lines for functionality that fits naturally
in ~289 lines of bash. The deploy script's core job is git operations
(fetch, copy, add, commit, push) which read more naturally in shell.

Changes from the original 88-line script:
- Rebase-based retry replaces sleep-based retry (instant vs 2+ minutes)
- Cleanup of stale PR/branch dirs integrated (was separate workflow step)
- Index regeneration integrated (was in build-orchestrator.js)
- Token auth via http.extraHeader (was in remote URL, leaked in logs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the original CLI style: deploy-gh-pages.sh <publish_dir> [--message <msg>]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@themr0c themr0c merged commit 4eeec21 into redhat-developer:release-1.9 Apr 27, 2026
7 of 9 checks passed
@themr0c themr0c deleted the fix/gh-pages-workflow-1.9 branch April 29, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants